Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow GitHub Action to run on Windows #456

Merged
merged 11 commits into from
Jul 23, 2024

Conversation

alcaeus
Copy link
Contributor

@alcaeus alcaeus commented Jul 17, 2024

This PR makes some changes to the orchestration action and involved scripts to allow them to run on Windows.

To reduce duplication in the download script, I've combined Windows and cygwin through a fallback, however since PHP does its Windows testing in GitHub Actions I'd appreciate it if someone could double-check that the case statement is still valid. It doesn't throw a syntax error, so that's a start. When running on Windows in GitHub Actions, the OS identifier is mingw64_nt-<version>-x86_64. Since the path to the extraction tools doesn't match the path used on cygwin, I had to duplicate the config. However, since 7zip is in the PATH on Windows, we might be able to reduce duplication again if it's in the PATH on cygwin as well. Again, can't test this since I don't have any Evergreen tasks on Windows.

The action needed a couple of changes, and I also added an output variable for the crypt_shared path, which is necessary for us to run tests in. I used the cygwin logic to kill processes on Windows, but wasn't able to test this as the orchestration isn't running in a build. Here's a sample build in PHPC that used the new action version: https://github.com/alcaeus/mongo-php-driver/actions/runs/9958433378/job/27559930163

@alcaeus alcaeus requested a review from blink1073 July 17, 2024 13:21
@alcaeus alcaeus self-assigned this Jul 17, 2024
@alcaeus
Copy link
Contributor Author

alcaeus commented Jul 17, 2024

It doesn't throw a syntax error, so that's a start.

Scratch that, MacOS doesn't like the syntax. Looks like I'll be bringing back the duplication.

@alcaeus alcaeus marked this pull request as draft July 17, 2024 13:56
@alcaeus alcaeus removed the request for review from blink1073 July 17, 2024 13:56
@alcaeus alcaeus force-pushed the fix-action-windows branch 3 times, most recently from f6b2fb8 to 9f56eee Compare July 23, 2024 11:06
@alcaeus
Copy link
Contributor Author

alcaeus commented Jul 23, 2024

It doesn't throw a syntax error, so that's a start.

Scratch that, MacOS doesn't like the syntax. Looks like I'll be bringing back the duplication.

Changing the shebang to bash fixed the issue, so I was able to get this done without duplication.

The PR is now ready for review, I added Windows to the test matrix here on GHA to protect against regressions.

@alcaeus alcaeus marked this pull request as ready for review July 23, 2024 11:16
@alcaeus alcaeus requested a review from blink1073 July 23, 2024 11:16
Copy link
Member

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@alcaeus alcaeus merged commit 050ab31 into mongodb-labs:master Jul 23, 2024
34 of 36 checks passed
@alcaeus alcaeus deleted the fix-action-windows branch July 23, 2024 12:05
adriandole pushed a commit to adriandole/drivers-evergreen-tools that referenced this pull request Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants